<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <link rel="stylesheet" type="text/css" href="css/thickbox.css"/>
    <script src="js/lib/head.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" src="js/lib/thickbox-compressed.js"></script>
    <script type="text/javascript">
        head.js("js/lib/prototypeInheritance.js")
                .js("js/classes/player2.js")
                .js("js/classes/bomb2.js")
                .js("js/utils.js")
                .js("js/classes/gameMode2.js")
                .js("js/loadLevel.js")
                .js("js/processKeys.js")
                .js("js/main.js")
                .js("js/ai/graph.js")
                .js("js/ai/astar.js");
    </script>

    <title>BomberMan</title>
</head>

<body>
<div id="fb-root"></div>
<script type="text/javascript">
    window.fbAsyncInit = function () {
        FB.init({
            appId:'258222107594922', // App ID
            channelUrl:'html/channel.html', // Channel File
            status:true, // check login status
            cookie:true, // enable cookies to allow the server to access the session
            xfbml:true  // parse XFBML
        });
    };

    function doLogin() {
        FB.login(function(response) {
            if (response.session) {
                FB.api('/me',  function(response) {
                            alert('Welcome ' + response.name);
                            alert('Full details: ' + JSON.stringify(response));
                        }
                );
            }
        } , {perms:''});
    }
    // Load the SDK Asynchronously
    (function (d) {
        var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
        if (d.getElementById(id)) {
            return;
        }
        js = d.createElement('script');
        js.id = id;
        js.async = true;
        js.src = "http://connect.facebook.net/en_US/all.js";
        ref.parentNode.insertBefore(js, ref);
    }(document));
</script>

<div id="content">
    <div id="canvasLeftWrapper">
        <a id="link-1" title="Profile" class="thickbox"
           href="html/profile.html?keepThis=true&TB_iframe=true&height=400&width=600">Profile</a>
        <a id="link-2" title="Rankings" class="thickbox"
           href="html/rankings.html?keepThis=true&TB_iframe=true&height=400&width=600">Rankings</a>
        <a id="link-3" title="Help" class="thickbox"
           href="html/help.html?keepThis=true&TB_iframe=true&height=400&width=600">Help</a>
        <a id="link-4" title="About" class="thickbox"
           href="html/about.html?keepThis=true&TB_iframe=true&height=400&width=600">About</a>
    </div>
    <div id="canvasWrapper">
        <div id="canvasWrapperTop">
            <div class="left"></div>
            <div id="title-1"></div>
            <div id="title-2"></div>
            <div id="title-3"></div>
            <div class="right"></div>
        </div>
        <div id="canvasWrapperLeft">
            <div class="upper"></div>
            <div id="lower-left"></div>
        </div>
        <div id="canvasWrapperSelf">
            <canvas id="canvas" width="608" height="512">
                Browser not compatible with canvas.
                Download Firefox 4+.
            </canvas>
        </div>
        <div id="canvasWrapperRight">
            <div class="upper"></div>
            <div id="lower-right"></div>
        </div>
        <div id="canvasWrapperBottom">
            <div id="left"></div>
            <p>Made by Jaanus Jaggo, Taivo Käsper, Tõnis Pool</p>

            <div id="right"></div>
        </div>
        <div id="moon"></div>
    </div>
    <div id="canvasRightWrapper">
        <input type="submit" class="fb_login" value="" onclick="doLogin();"/>
    </div>

</div>
</body>
</html>